<script lang="ts" setup>
defineOptions({
  name: 'AppGlobalLimited',
})
const route = useRoute()
const { brandConfig } = storeToRefs(useBrandStore())
watchEffect(() => {
  if (brandConfig.value) {
    const { ban, bl } = brandConfig.value
    if (ban)
      i18nNavigateTo('/limit-ip?limitType=area')
    else
    if (route.name?.toString().includes('limit-ip') && !ban)
      i18nNavigateTo('/')

    if (bl)
      i18nNavigateTo('/limit-ip?limitType=ip')
    else
    if (route.name?.toString().includes('limit-ip') && !bl)
      i18nNavigateTo('/')
  }
})
</script>

<template>
  <div />
</template>
